<!-- Cropping modal -->
<div class="modal fade" id="avatar-modal" aria-hidden="true" aria-labelledby="avatar-modal-label" role="dialog" tabindex="-1">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form class="avatar-form" action="/media/upload" enctype="multipart/form-data" method="post">
        <div class="modal-header">
          <button class="close" data-dismiss="modal" type="button">&times;</button>
          <h3 class="modal-title" id="avatar-modal-label">上传图片</h3>
        </div>
        <div class="modal-body">
          <div class="avatar-body">

            <!-- Upload image and data -->
            <div class="avatar-upload">
              <input class="avatar-src" name="avatar_src" type="hidden">
              <input class="avatar-data" name="avatar_data" type="hidden">
              <label for="avatarInput">图片链接</label>
              <input class="avatar-input" name="avatar_file" type="file" id="avatarInput">
            </div>

            <!-- Crop and preview -->
            <div class="row">
              <div class="col-md-9">
                <div class="avatar-wrapper"></div>
              </div>
              <div class="col-md-3">
                <div class="avatar-preview preview-lg"></div>
                <div class="avatar-preview preview-md"></div>
                <div class="avatar-preview preview-sm"></div>
              </div>
            </div>

            <div class="row avatar-btns">
              <div class="col-md-3">
                <button class="btn btn-primary btn-block avatar-save" type="submit">上传</button>
              </div>
            </div>
          </div>
        </div>
      </form>
    </div>
  </div>
</div><!-- /.modal -->

<!-- Loading state -->
<div class="loading" aria-label="Loading" role="img" tabindex="-1"></div>